//
// Created by jiaoheng on 2025/7/21.
//
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define BUFFER_SIZE 1024

int main(){
    const char *filename= "example.txt";
    FILE *file;
    char buffer[BUFFER_SIZE];
    // 1.同步写入文件
    file = fopen(filename,"w");
    const char *content = "这是一个同步I/O的示例文件。\n第二行内容。\n";
    fwrite(content,sizeof(char), strlen(content),file);

}
